﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using Antu.WebControls;
using Antu.Core.Components;
using Antu.Core.Services;
using System.Web.UI.WebControls;
using EluZSProvider;
using System.Web;
using System.Data;
using System.Collections;
using System.Text.RegularExpressions;

namespace WebSys.UI.Control.ZhengShou
{
    public class ZS_BCJDCJDataControl : MPBasicTemplate
    {
        EluZSDataProvider _EluZSDataProvider = (EluZSDataProvider)ProviderService.ProviderServiceMange.GetProvider("EluZSProvider");
        CustomGridView CustomGridView1;

        public string userid = string.Empty;
        DropDownList ddlSzq, ddlJaqk, ddlFsqk, ddlFYSLJG, ddlTjlx, ddlXYFYSLJG, ddlFYZXQK, ddlXYFYZXQK;

        TextBox txtXkzh, txtCaseID;
        MPCalendar calCjsjBig, calCjsjLess;
        TextBox txtSqr, txtBsqr, txtBcqfwdz, txtJzmjBig, txtJzmjLess, txtPgjeBig, txtPgjeLess;

        CheckBox CUIGAOFACHUDATE, CUIGAOSONGDADATE, QIANGZHIDATE, TINGZHENGDATE;
        CheckBox XYQIANGZHIDATE, XYTINGZHENGDATE;

        MPCalendar calSlsjBig, calSlsjLess, calJzslBig, calJzsjLess;
        Button btnQuery, Button1, Button2;
        Panel Panel1, Panel2;
        Literal Literal1, Literal2;
        public String strHtml = string.Empty;
        public String xHtmlString = string.Empty;
        
        protected override void OnLoad(EventArgs e)
        {
            if (HttpContext.Current.Session["UserID"] == null)
            {
                Antu.Utilities.UtilitiesPage.AlertDialogClear("登录超时，请重新登录！", "window.parent.location.href('../login.aspx');");
            }
            else
            {
                userid = HttpContext.Current.Session["UserID"].ToString();
            }
            base.OnLoad(e);

            InitControl();
            btnQuery.Click += new EventHandler(btnQuery_Click);
            Button1.Click += new EventHandler(Button1_Click);
            Button2.Click += new EventHandler(Button2_Click);
            if (!base.Page.IsPostBack)
            {
                DataBinderddlSzq();
                DataBinderddlJaqk();
                DataBinderddlfsqk();
                DataBinderddlFYSLJG();
                DataBinderddlzxqk();
                BindData();
            }

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Panel1.Visible = true;
            Panel2.Visible = false;
        }
        protected void BindData() {
            
            string tjlx = ddlTjlx.SelectedValue;
            string jaqk = ddlJaqk.SelectedItem.Text;
            //如果统计类型为1：拆迁项目裁决数据统计表（含比例）
            if (tjlx == "1")
            {
                CreateHtml();
            }
            //如果统计类别为0：拆迁项目裁决数据统计表
            else if (tjlx == "0")
            {
                CreatHtmlTable cTable = new CreatHtmlTable();
                StructHtmlTable sHtable = new StructHtmlTable();
                Hashtable htHidden = new Hashtable();
                htHidden = HiddenField(jaqk);
                //string CountStr = "征收户数,按转户数,申请裁决户数,正在审理,调解解决,不予受理,已经裁决户数,中止裁决户数,终结裁决户数,催告已发出,催告已送达,已提交法院户数,已听证户数,准予申请户数,准予撤回申请户数,不予申请户数,已调节,已强制,先予已提交法院户数,先予已听证户数,先予准予申请户数,先予准予撤回申请户数,先予不予申请户数,先予已调节,先予已强制";
                string CountStr = "征收户数,按转户数,申请户数,正在审理,调解解决,不予受理,已完成户数,中止户数,终结户数,催告已发出,催告已送达,已提交法院户数,已听证户数,准予申请户数,准予撤回申请户数,不予申请户数,已调节,已强制,先予已提交法院户数,先予已听证户数,先予准予申请户数,先予准予撤回申请户数,先予不予申请户数,先予已调节,先予已强制";
                sHtable.DataTableTemp = GetData();
                sHtable.PageSize = 20;
                sHtable.StatField = CountStr;//绘制表格的所有列字段名称
                sHtable.TableCss = "window_tab_list";
                sHtable.HiddenField = htHidden;
                sHtable.TableName = "征收补偿决定裁决数据统计表";
                strHtml = cTable.CreateHtml(sHtable);
            }
            //索引为2:拆迁项目裁决受理情况表
            else
            {
                CreateHtmlCjsl();
            }
            Literal1.Text = strHtml;
        }
        protected void BindData1() {
            string strWhere = string.Empty;
            strWhere = whereValue();
            string strSql = string.Format("select a.caseid 案件号,a.slsj 受理时间,a.sqr 申请人,a.BSQR 被申请人,a.fwdz 房屋地址,a.xkzh 许可证号,a.bz 备注 from zs_case_register a where 1 = 1 ");
            strSql += strWhere;
            strSql += " order by caseid ";
            DataTable dtTemp = _EluZSDataProvider.GetTable(strSql);

            CreatHtmlTable cTable = new CreatHtmlTable();
            Hashtable FieldFormat = new Hashtable();
            FieldFormat.Add("受理时间", "{0:d}");
            Hashtable FieldWidth = new Hashtable();
            FieldWidth.Add("案件号", "15%");
            FieldWidth.Add("受理时间", "8%");
            FieldWidth.Add("申请人", "17%");
            FieldWidth.Add("被申请人", "11%");
            FieldWidth.Add("房屋地址", "20%");
            FieldWidth.Add("许可证号", "16%");
            FieldWidth.Add("备注", "7%");
            StructHtmlTable sHtable = new StructHtmlTable();
            sHtable.TableName = "";
            sHtable.TableCss = "tab";
            sHtable.PageSize = 15;
            sHtable.DataTableTemp = dtTemp;
            sHtable.FieldWidth = FieldWidth;
            sHtable.FormatField = FieldFormat;
            sHtable.TableCss = "window_tab_list";
            
            xHtmlString = cTable.CreateHtml(sHtable);
            sHtable.TableName = "征收补偿决定案件打印页面";
            Literal2.Text = xHtmlString;
        }
        protected void btnQuery_Click(object sender, EventArgs e)
        {
            //savesession();
            //base.Page.Session["wherevalue"] = "";
            //string wherekey = whereValue();
            //string strdata = strDate();
            ////base.Page.Session["wherevalue"] = wherekey;
            ////base.Page.Session["strdate"] = strDate();
            //string tjlx = ddlTjlx.SelectedValue;//统计类型
            //string fsqk = ddlFsqk.SelectedValue;//发送情况
            //string jaqk = ddlJaqk.SelectedItem.Text;//结案情况
            //string fsqkValue = string.Empty;
            //if (fsqk != "0")
            //{
            //    fsqkValue = fsqk;
            //}
            //string sLink = "ZS_BCJDCJDataInfo.aspx?fsqk=" + fsqkValue + "&tjlx=" + tjlx + "&jaqk=" + jaqk + "&wherekey=" + wherekey + "&strdata=" + strdata;
            //Page.ClientScript.RegisterStartupScript(this.GetType(), "openNewWindow1", "<script>window.open('" + sLink + "');window.location.href=window.location.href; </script>");
            BindData();
            Panel2.Visible = true;
            Panel1.Visible = false;
            Literal1.Visible = true;
            Literal2.Visible = false;
        }
        protected void Button2_Click(object sender, EventArgs e)
        {
            BindData1();
            Panel2.Visible = true;
            Panel1.Visible = false;
            Literal1.Visible = false;
            Literal2.Visible = true;
        }
        protected void InitControl()
        {
            CustomGridView1 = (CustomGridView)FindControl("CustomGridView1");
            ddlSzq = (DropDownList)FindControl("ddlSzq");//绑定所在区
            ddlJaqk = (DropDownList)FindControl("ddlJaqk");//结案情况
            ddlFsqk = (DropDownList)FindControl("ddlFsqk");//发送情况
            ddlFYSLJG = (DropDownList)FindControl("ddlFYSLJG");//裁定结果
            ddlXYFYSLJG = (DropDownList)FindControl("ddlXYFYSLJG");//先予裁定结果
            ddlTjlx = (DropDownList)FindControl("ddlTjlx");//统计类型

            btnQuery = (Button)FindControl("btnQuery");
            Button1 = (Button)FindControl("Button1");
            txtXkzh = (TextBox)FindControl("txtXkzh");//许可证号
            txtCaseID = (TextBox)FindControl("txtCaseID");//案件号
            calCjsjBig = (MPCalendar)FindControl("calCjsjBig");//裁决时间大于等于
            calCjsjLess = (MPCalendar)FindControl("calCjsjLess");//裁决时间小于等于


            txtSqr = (TextBox)FindControl("txtSqr");//申请人
            txtBsqr = (TextBox)FindControl("txtBsqr");//被申请人
            txtBcqfwdz = (TextBox)FindControl("txtBcqfwdz");//被拆迁房屋地址
            txtJzmjBig = (TextBox)FindControl("txtJzmjBig");//建筑面积大于等于
            txtJzmjLess = (TextBox)FindControl("txtJzmjLess");//建筑面积小于
            txtPgjeBig = (TextBox)FindControl("txtPgjeBig");//评估金额大于等于
            txtPgjeLess = (TextBox)FindControl("txtPgjeLess");//评估金额小于


            CUIGAOFACHUDATE = (CheckBox)FindControl("CUIGAOFACHUDATE");//催告已发出
            CUIGAOSONGDADATE = (CheckBox)FindControl("CUIGAOSONGDADATE");//催告已送达
            QIANGZHIDATE = (CheckBox)FindControl("QIANGZHIDATE");//已提交法院户数
            TINGZHENGDATE = (CheckBox)FindControl("TINGZHENGDATE");//已听证户数
            XYQIANGZHIDATE = (CheckBox)FindControl("XYQIANGZHIDATE");//先予已提交法院户数
            XYTINGZHENGDATE = (CheckBox)FindControl("XYTINGZHENGDATE");//先予已听证户数

            calSlsjBig = (MPCalendar)FindControl("calSlsjBig");//受理时间大于等于
            calSlsjLess = (MPCalendar)FindControl("calSlsjLess");//受理时间小于
            calJzslBig = (MPCalendar)FindControl("calJzslBig");//结转时间大于等于
            calJzsjLess = (MPCalendar)FindControl("calJzsjLess");//结转时间小于

            Panel1 = (Panel)FindControl("Panel1");
            Panel2 = (Panel)FindControl("Panel2");
            Button2 = (Button)FindControl("Button2");
            Literal1 = (Literal)FindControl("Literal1");
            Literal2 = (Literal)FindControl("Literal2");

            ddlFYZXQK = (DropDownList)FindControl("ddlFYZXQK");//执行情况
            ddlXYFYZXQK = (DropDownList)FindControl("ddlXYFYZXQK");//先予执行情况
        }


        #region 查询条件
        /// <summary>
        /// 查询条件
        /// </summary>
        /// <returns></returns>
        protected String whereValue()
        {
            string whereKey = string.Empty;
            string xkzh = txtXkzh.Text.Trim();//许可证号
            string caseid = txtCaseID.Text.Trim();//案件号
            string jaqk = ddlJaqk.SelectedValue;//结案情况
            string szq = ddlSzq.SelectedValue;//所在区       
            string cjsjLess = calCjsjLess.Text.Trim();//裁决时间小于
            string cjsjBig = calCjsjBig.Text.Trim();//裁决时间大于等于        
            string sqr = txtSqr.Text.Trim();//申请人
            string bsqr = txtBsqr.Text.Trim();//被申请人
            string bcqfwdz = txtBcqfwdz.Text.Trim();//被拆迁房屋坐落
            string jzmjLess = txtJzmjLess.Text.Trim();//建筑面积小于
            string jzmjBig = txtJzmjBig.Text.Trim();//建筑面积大于等于
            string pgjeLess = txtPgjeLess.Text.Trim();//评估金额小于
            string pgjeBig = txtPgjeBig.Text.Trim();//评估金额大于等于

            string whereKey1 = string.Empty;
            if (!string.IsNullOrEmpty(xkzh))   //许可证号
            {
                whereKey1 += " and a.xkzh like '%" + ReturnString(xkzh) + "%'";
            }
            if (!string.IsNullOrEmpty(caseid))      //案件号
            {
                whereKey1 += " and a.caseid like '%" + ReturnString2(caseid) + "%'";
            }
            if (jaqk != "0")     //结案情况
            {
                if (jaqk != "7")
                {
                    whereKey1 += " and jaqk ='" + jaqk + "'";
                }
                else
                {
                    whereKey1 += " and jaqk != '1' and jaqk !='2'";
                }
            }
            if (szq != "0")
            {
                whereKey1 += " and szq ='" + szq + "'";  //所在区
            }
            if (!string.IsNullOrEmpty(cjsjLess))
            {
                whereKey1 += " and caijuexiadadate < to_date('" + cjsjLess + "','yyyy-MM-dd')";
            }
            if (!string.IsNullOrEmpty(cjsjBig))  //裁决时间
            {
                whereKey1 += " and caijuexiadadate >= to_date('" + cjsjBig + "','yyyy-MM-dd')";
            }
            if (!string.IsNullOrEmpty(sqr))
            {
                whereKey1 += " and sqr like '%" + sqr + "%'";//申请人
            }
            if (!string.IsNullOrEmpty(bsqr))
            {
                whereKey1 += " and bsqr like '%" + bsqr + "%'";//被申请人
            }
            if (!string.IsNullOrEmpty(bcqfwdz))
            {
                whereKey1 += " and fwdz like '%" + bcqfwdz + "%'";//被拆迁房屋坐落
            }
            if (!string.IsNullOrEmpty(pgjeLess))      //评估金额
            {
                whereKey1 += " and pgje <'" + pgjeLess + "'";
            }
            if (!string.IsNullOrEmpty(pgjeBig))
            {
                whereKey1 += " and pgje >='" + pgjeBig + "'";
            }
            //催送情况
            if (CUIGAOFACHUDATE.Checked)
            {
                whereKey1 += " and CUIGAOFACHUDATE is not null";
            }
            if (CUIGAOSONGDADATE.Checked)   //催告送达时间
            {
                whereKey1 += " and CUIGAOSONGDADATE is not null";
            }
            if (QIANGZHIDATE.Checked)       // 提交法院时间
            {
                whereKey1 += " and QIANGZHIDATE is not null";
            }
            if (TINGZHENGDATE.Checked)         //听证时间
            {
                whereKey1 += " and TINGZHENGDATE is not null";
            }
            if (XYQIANGZHIDATE.Checked)          //先予提交法院时间
            {
                whereKey1 += " and XYQIANGZHIDATE is not null ";
            }
            if (XYTINGZHENGDATE.Checked)            //先予听证时间
            {
                whereKey1 += " and XYTINGZHENGDATE is not null ";
            }
            if (Convert.ToInt32(ddlFYSLJG.SelectedValue) > 0)            //裁定结果
            {
                whereKey1 += " and FYSLJG='" + ddlFYSLJG.SelectedValue + "'";
            }
            if (Convert.ToInt32(ddlXYFYSLJG.SelectedValue) > 0)            //先予裁定结果
            {
                whereKey1 += " and XYFYSLJG='" + ddlXYFYSLJG.SelectedValue + "'";
            }
            if (Convert.ToInt32(ddlFYZXQK.SelectedValue) > 0)           //执行情况
            {
                whereKey1 += " and FYZXQK='" + ddlFYZXQK.SelectedValue + "'";
            }
            if (Convert.ToInt32(ddlXYFYZXQK.SelectedValue) > 0)         //先予执行情况
            {
                whereKey1 += " and XYFYZXQK='" + ddlXYFYZXQK.SelectedValue + "' ";
            }
            whereKey += string.Format("And iid In (Select iid from zs_case_register a where 1=1 {0})", whereKey1);
            whereKey += strDate();
            return whereKey;
        }
        #endregion


        #region 受理时间与结转时间
        /// <summary>
        /// 受理时间与结转时间
        /// </summary>
        /// <returns></returns>
        protected String strDate()
        {
            string whereKey = string.Empty;
            string slsjLess = calSlsjLess.Text;//受理时间小于
            string slsjBig = calSlsjBig.Text;//受理时间大于等于
            string jzsjLess = calJzsjLess.Text.Trim();//结转时间小于
            string jzsjBig = calJzslBig.Text.Trim();//结转时间大于等于
            string whereKey1 = string.Empty;
            if (!string.IsNullOrEmpty(slsjLess) && string.IsNullOrEmpty(jzsjLess))
            {
                whereKey1 += string.Format(@" and slsj < to_date('{0}', 'yyyy-MM-dd')", slsjLess);
            }
            else if (!string.IsNullOrEmpty(slsjLess) && !string.IsNullOrEmpty(jzsjLess))
            {
                whereKey1 += string.Format(@" and (slsj < to_date('{0}', 'yyyy-MM-dd') or jzsj < to_date('{1}', 'yyyy-mm-dd'))", slsjLess, jzsjLess);
            }
            else if (!string.IsNullOrEmpty(jzsjLess) && string.IsNullOrEmpty(slsjLess))
            {
                whereKey1 += string.Format(@" and jzsj < to_date('{0}', 'yyyy-MM-dd')", jzsjLess);
            }

            if (!string.IsNullOrEmpty(slsjBig) && string.IsNullOrEmpty(jzsjBig))
            {
                whereKey1 += string.Format(@" and slsj >= to_date('{0}', 'yyyy-MM-dd')", slsjBig);
            }
            else if (!string.IsNullOrEmpty(slsjBig) && !string.IsNullOrEmpty(jzsjBig))
            {
                whereKey1 += string.Format(@" and (slsj >= to_date('{0}', 'yyyy-MM-dd') or jzsj >= to_date('{1}', 'yyyy-mm-dd'))", slsjBig, jzsjBig);
            }
            else if (!string.IsNullOrEmpty(jzsjBig) && string.IsNullOrEmpty(slsjBig))
            {
                whereKey1 += string.Format(@" and jzsj >= to_date('{0}', 'yyyy-MM-dd')", jzsjBig);
            }
            whereKey += string.Format("And iid In (Select iid from zs_case_register a where 1=1 {0})", whereKey1);

            return whereKey;
        }
        #endregion


        #region 所在区
        protected void DataBinderddlSzq()
        {
            List<EluZSProvider.Params> _params = _EluZSDataProvider.GetParams("区属");
            EluZSProvider.Params item = new Params();
            item.Keyname = "全部...";
            item.Keyvalue = "0";
            _params.Insert(0, item);
            ddlSzq.DataSource = _params;
            ddlSzq.DataValueField = "keyvalue";
            ddlSzq.DataTextField = "keyname";
            ddlSzq.DataBind();
        }
        #endregion

        #region 结案情况
        protected void DataBinderddlJaqk()
        {
            List<EluZSProvider.Params> _params = _EluZSDataProvider.GetParams("结案情况");
            EluZSProvider.Params item = new Params();
            item.Keyname = "全部...";
            item.Keyvalue = "0";
            _params.Insert(0, item);
            ddlJaqk.DataSource = _params;
            ddlJaqk.DataValueField = "keyvalue";
            ddlJaqk.DataTextField = "keyname";
            ddlJaqk.DataBind();
        }
        #endregion

        #region 发送情况
        /// <summary>
        /// 发送情况（查询不到数据）
        /// </summary>
        protected void DataBinderddlfsqk()
        {
            List<EluZSProvider.Params> _params = _EluZSDataProvider.GetParams("发送情况");
            EluZSProvider.Params item = new Params();
            item.Keyname = "全部...";
            item.Keyvalue = "0";
            _params.Insert(0, item);
            ddlFsqk.DataSource = _params;
            ddlFsqk.DataValueField = "keyvalue";
            ddlFsqk.DataTextField = "keyname";
            ddlFsqk.DataBind();
        }
        #endregion

        #region 裁定结果
        /// <summary>
        /// 裁定结果
        /// </summary>
        protected void DataBinderddlFYSLJG()
        {
            List<EluZSProvider.Params> _params = _EluZSDataProvider.GetParams("裁定结果");
            EluZSProvider.Params item = new Params();
            item.Keyname = "全部...";
            item.Keyvalue = "0";
            _params.Insert(0, item);
            ddlFYSLJG.DataSource = _params;
            ddlFYSLJG.DataValueField = "keyvalue";
            ddlFYSLJG.DataTextField = "keyname";
            ddlFYSLJG.DataBind();
            ddlXYFYSLJG.DataSource = _params;
            ddlXYFYSLJG.DataValueField = "keyvalue";
            ddlXYFYSLJG.DataTextField = "keyname";
            ddlXYFYSLJG.DataBind();

        }
        #endregion

        #region 执行情况
        public void DataBinderddlzxqk()
        {
            List<EluZSProvider.Params> _params = _EluZSDataProvider.GetParams("执行情况");
            EluZSProvider.Params item = new Params();
            item.Keyname = "全部...";
            item.Keyvalue = "0";
            _params.Insert(0, item);
            ddlFYZXQK.DataSource = _params;
            ddlFYZXQK.DataValueField = "keyvalue";
            ddlFYZXQK.DataTextField = "keyname";
            ddlFYZXQK.DataBind();
            ddlXYFYZXQK.DataSource = _params;
            ddlXYFYZXQK.DataValueField = "keyvalue";
            ddlXYFYZXQK.DataTextField = "keyname";
            ddlXYFYZXQK.DataBind();
        }
        #endregion

        public string ReturnString(string txt)
        {
            string str = string.Empty;
            if (txt.Trim().Length == 7)
            {
                int i;
                if (int.TryParse(txt.Trim(), out i))
                {
                    string nian = txt.Trim().Substring(0, 4);
                    string yue = txt.Trim().Substring(4, 3);
                    str = nian + "年第" + yue;
                }
                else
                {
                    str = txt;
                }
            }
            else if (txt.Trim().Length > 7)
            {
                int i;
                if (int.TryParse(txt.Trim(), out i))
                {
                    string first = txt.Trim().Substring(0, 1);
                    string nian = txt.Trim().Substring(1, 5);
                    string yue = txt.Trim().Substring(5, txt.Trim().Length - 5);
                    str = first + "府征字（" + nian + "年第" + yue;
                }
                else
                {
                    str = txt;
                }
            }
            else
            {
                str = txt;
            }
            return str;

        }

        public string ReturnString2(string txt)
        {
            string str = string.Empty;
            if (txt.Trim().Length == 8)
            {
                int i;
                if (int.TryParse(txt.Trim(), out i))
                {
                    string nian = txt.Trim().Substring(0, 4);
                    string yue = txt.Trim().Substring(4, 4);
                    str = nian + "）第" + yue;
                }
                else
                {
                    str = txt;
                }
            }
            else if (txt.Trim().Length >4 && txt.Trim().Length < 8)
            {
                int i;
                if (int.TryParse(txt.Trim(), out i))
                {
                    string nian = txt.Trim().Substring(0, 4);
                    string yue = txt.Trim().Substring(4, (txt.Trim().Length-4));
                    str = nian + "）第" + yue;
                }
                else
                {
                    str = txt;
                }
            }
            else
            {
                str = txt;
            }
            return str;

        }

        private void CreateHtml()
        {
            DataTable dt = GetData();
            System.Text.StringBuilder sb_Content = new System.Text.StringBuilder();
            int cqhs = 0;//征收户数
            int sqcjhs = 0;//申请裁决户数
            int zzslhs = 0;//正在审理户数
            int tjhs = 0;//调解户数
            int byslhs = 0;//不予受理户数
            int cjhs = 0;//裁决户数
            int azhs = 0;//按转户数
            double sqScq = 0.00;
            double cjScq = 0.00;
            double cjSsq = 0.00;
            double tjSsq = 0.00;

            System.Text.StringBuilder sb_html = new System.Text.StringBuilder();
            string strPages = string.Empty;// "<div class='PageNext'></div>";
            int CountStr = 1;

            int loop = 0; //要生成的表格数

            int rows = 12;  //每个表格的行数

            int mod = 0;  //余数
            int start = 0;
            int end = 0;
            string s = string.Empty;
            if (dt != null)
            {
                loop = dt.Rows.Count / rows;
                mod = dt.Rows.Count % rows;

                if (mod != 0)
                {
                    loop = loop + 1;
                }
            }
            string strHead = string.Empty;
            string pagebreak = "page-break-after:always;";
            string strEnd = "</table><br>";
            for (int loops = 0; loops < loop; loops++)
            {
                if (loops == loop - 1)
                {
                    pagebreak = "";
                }
                strHead = string.Format(@"<table border='1'  cellpadding='0' cellspacing='0' width='97%' class='tab' style='{0}'>
                <th colspan='15'>拆迁项目裁决数据统计表</th>
                <tr>
                <td>序号</td>
                <td>许可证号</td>
                <td>单位名称</td>
                <td>项目名称</td>
                <td>征收户数</td>
                <td>按转户数</td>
                <td>申请裁决</td>
                <td>正在审理</td>
                <td>调解户数</td>
                <td>不予受理</td>
                <td>裁决户数</td>                
                <td>申请户数/征收户数%</td>
                <td>裁决户数/征收户数%</td>
                <td>裁决户数/申请户数%</td>
                <td>调解户数/申请户数%</td>
                </tr>", pagebreak);
                start = loops * rows;
                end = start + rows;
                #region
                for (int m = start; m < end && m < dt.Rows.Count; m++)
                {
                    sb_Content.AppendFormat("<td style='font-size: 12px;'>{0}</td>", CountStr);
                    CountStr++;
                    foreach (DataColumn cl in dt.Columns)
                    {
                        if (dt.Rows[m][cl].ToString().Trim() != "")
                        {
                            switch (cl.ToString())
                            {
                                default:
                                    sb_Content.AppendFormat("<td style='font-size: 12px;'>{0}</td>", dt.Rows[m][cl].ToString());
                                    break;
                            }
                        }
                        else
                        {
                            sb_Content.AppendFormat("<td>{0}</td>", "&nbsp;");
                        }
                    }
                    int cCqhs = 0;
                    if (dt.Rows[m]["征收户数"].ToString() != "")
                    {
                        cCqhs = int.Parse(dt.Rows[m]["征收户数"].ToString().Trim());
                    }
                    int cCjhs = int.Parse(dt.Rows[m]["裁决户数"].ToString().Trim());
                    int cSqcjhs = int.Parse(dt.Rows[m]["申请裁决户数"].ToString().Trim());
                    int cTjhs = int.Parse(dt.Rows[m]["调解解决"].ToString().Trim());

                    if (cCqhs != 0)
                    {
                        sqScq = Convert.ToDouble(cSqcjhs) / Convert.ToDouble(cCqhs);
                        cjScq = Convert.ToDouble(cCjhs) / Convert.ToDouble(cCqhs);
                    }
                    if (cSqcjhs != 0)
                    {
                        cjSsq = Convert.ToDouble(cCjhs) / Convert.ToDouble(cSqcjhs);
                        tjSsq = Convert.ToDouble(cTjhs) / Convert.ToDouble(cSqcjhs);
                    }

                    sb_Content.AppendFormat("<td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td>", doubleToPercent(sqScq), doubleToPercent(cjScq), doubleToPercent(cjSsq), doubleToPercent(tjSsq));
                    if (dt.Rows[m]["征收户数"].ToString() != "")
                    {
                        cqhs += int.Parse(dt.Rows[m]["征收户数"].ToString().Trim());
                    }
                    sqcjhs += int.Parse(dt.Rows[m]["申请裁决户数"].ToString().Trim());
                    zzslhs += int.Parse(dt.Rows[m]["正在审理"].ToString().Trim());
                    tjhs += int.Parse(dt.Rows[m]["调解解决"].ToString().Trim());
                    byslhs += int.Parse(dt.Rows[m]["不予受理"].ToString().Trim());
                    cjhs += int.Parse(dt.Rows[m]["裁决户数"].ToString().Trim());
                    azhs += int.Parse(dt.Rows[m]["按转户数"].ToString().Trim());
                    sb_Content.Append("</tr>");
                }
                #endregion

                if (cqhs != 0)
                {
                    sqScq = Convert.ToDouble(sqcjhs) / Convert.ToDouble(cqhs);
                    cjScq = Convert.ToDouble(cjhs) / Convert.ToDouble(cqhs);
                }
                if (sqcjhs != 0)
                {
                    cjSsq = Convert.ToDouble(cjhs) / Convert.ToDouble(sqcjhs);
                    tjSsq = Convert.ToDouble(tjhs) / Convert.ToDouble(sqcjhs);
                }

                if (loops == loop - 1)
                {
                    sb_Content.AppendFormat("<tr style='color:#ff0000'><td colspan='4'>总计：{10}</td><td>{0}</td><td>{11}</td><td>{1}</td><td>{2}</td><td>{3}</td><td>{4}</td><td>{5}</td><td>{6}</td><td>{7}</td><td>{8}</td><td>{9}</td></tr>",
                    cqhs, sqcjhs, zzslhs, tjhs, byslhs, cjhs, doubleToPercent(sqScq), doubleToPercent(cjScq), doubleToPercent(cjSsq), doubleToPercent(tjSsq), dt.Rows.Count + "条", azhs);
                }
                sb_html.AppendFormat("{0}{1}{2}{3}", strHead, sb_Content.ToString(), strEnd, strPages);
                sb_Content.Length = 0;
            }
            if (dt.Rows.Count == 0)
            {
                sb_Content.Append("<tr><td colspan='13' style='color:#ff0000'>没有找到相关信息！</td></tr>");
                sb_html.AppendFormat("{0}{1}{2}{3}", strHead, sb_Content.ToString(), strEnd, strPages);
            }
            strHtml = sb_html.ToString();
        }

        private void CreateHtmlCjsl()
        {
            DataTable dt = GetData();
            System.Text.StringBuilder sb_Content = new System.Text.StringBuilder();
            System.Text.StringBuilder sb_html = new System.Text.StringBuilder();
            string strPages = string.Empty;// "<div class='PageNext'></div>";
            int CountStr = 1;

            int loop = 0; //要生成的表格数

            int rows = 11;  //每个表格的行数

            int mod = 0;  //余数
            int start = 0;
            int end = 0;
            string s = string.Empty;
            if (dt != null)
            {
                loop = dt.Rows.Count / rows;
                mod = dt.Rows.Count % rows;

                if (mod != 0)
                {
                    loop = loop + 1;
                }
            }
            string strHead = string.Empty;
            string pagebreak = "page-break-after:always;";
            string strEnd = "</table><br>";
            for (int loops = 0; loops < loop; loops++)
            {
                if (loops == loop - 1)
                {
                    pagebreak = "";
                }
                strHead = string.Format(@"<table border='1'  cellpadding='0' cellspacing='0' width='97%' class='tab' style='{0}'>
                <th colspan='15'>拆迁项目裁决受理情况表</th>
                <tr>
                <td style='width:3%'>序号</td>
                <td style='width:6%'>许可证号</td>                
                <td style='width:18%'>项目名称</td>
                <td style='width:14%'>建设单位</td>
                <td style='width:6%'>项目地址</td>
                <td style='width:19%'>实施单位</td>                
                <td style='width:8%'>裁决受理时间</td>
                <td style='width:8%'>裁决听证时间</td>
                <td style='width:7%'>是否达70%</td>
                <td style='width:8%'>是否特事特办</td>
                <td style='width:4%'>备注</td> 
                </tr>", pagebreak);
                start = loops * rows;
                end = start + rows;
                #region
                for (int m = start; m < end && m < dt.Rows.Count; m++)
                {
                    sb_Content.AppendFormat("<td style='font-size: 12px;'>{0}</td>", CountStr);
                    CountStr++;
                    foreach (DataColumn cl in dt.Columns)
                    {
                        if (dt.Rows[m][cl].ToString().Trim() != "")
                        {
                            switch (cl.ToString())
                            {
                                case "最小时间":
                                    sb_Content.AppendFormat("<td style='font-size:12px;'>{0}</td>", string.Format("{0:d}", dt.Rows[m][cl]));
                                    break;
                                default:
                                    sb_Content.AppendFormat("<td style='font-size: 12px;'>{0}</td>", dt.Rows[m][cl].ToString());
                                    break;
                            }
                        }
                        else
                        {
                            sb_Content.AppendFormat("<td>{0}</td>", "&nbsp;");
                        }
                    }
                    sb_Content.Append("<td></td><td></td><td></td><td></td>");
                    sb_Content.Append("</tr>");
                }
                #endregion

                if (loops == loop - 1)
                {
                    sb_Content.AppendFormat(@"<tr style='color:#ff0000'><td>总计</td><td colspan='10'>{0}条记录</td></tr>", CountStr - 1);
                }
                sb_html.AppendFormat("{0}{1}{2}{3}", strHead, sb_Content.ToString(), strEnd, strPages);
                sb_Content.Length = 0;
            }
            if (dt.Rows.Count == 0)
            {
                sb_Content.Append("<tr><td colspan='13' style='color:#ff0000'>没有找到相关信息！</td></tr>");
                sb_html.AppendFormat("{0}{1}{2}{3}", strHead, sb_Content.ToString(), strEnd, strPages);
            }
            strHtml = sb_html.ToString();
        }

        /// <summary>
        /// 获得统计的数据返回DataTable
        /// </summary>
        /// <returns></returns>
        protected DataTable GetData()
        {
            //string whereValue = Page.Session["whereValue"].ToString();
            string whereValue1 = string.Empty;
            whereValue1 = whereValue(); ;
            string tjlx = ddlTjlx.SelectedValue;
            string fsqk = ddlFsqk.SelectedValue; ;
            string strDate1 = strDate();
            //string strDate = Page.Session["strDate"].ToString();
            //CqcjInfo cqcj = new CqcjInfo();
            //DataTable dtTemp = new DataTable();
            //if (tjlx != "2")
            //{
            //    dtTemp = cqcj.GetCjsjStat(whereValue, fsqk, strDate);
            //}
            //else
            //{
            //    dtTemp = cqcj.GetCjslInfoTable(whereValue, fsqk, strDate);
            //}
            DataTable dtTemp = new DataTable();
            if (tjlx != "2")
            //如果统计类型 不为拆迁项目裁决受理情况表 0  1 拆迁项目裁决数据统计表（含比例）、拆迁项目裁决数据统计表
            {
                dtTemp = _EluZSDataProvider.GetCjsjStat(whereValue1, fsqk, strDate1);
            }
            //如果统计类型为 2   拆迁项目裁决受理情况表
            else
            {
                dtTemp = _EluZSDataProvider.GetCjslInfoTable(whereValue1, fsqk, strDate1);
            }
            //dtTemp = _EluZSDataProvider.GetCjsjStat(whereValue, fsqk, strDate);
            return dtTemp;
        }

        /// <summary>
        /// 小数转换为百分数
        /// </summary>
        /// <param name="d"></param>
        /// <returns></returns>
        protected string doubleToPercent(double d)
        {
            string s = "0%";
            if (!string.IsNullOrEmpty(Convert.ToString(d)))
            {
                s = string.Format("{0:P}", d);
            }
            return s;
        }

        /// <summary>
        /// 根据结案情况判断隐藏域中应该为何值
        /// </summary>
        /// <param name="jaqk">结案情况</param>
        /// <returns></returns>
        protected Hashtable HiddenField(string jaqk)
        {
            Hashtable htHidden = new Hashtable();
            if (jaqk == "已经裁决及不予受理")
            {
                htHidden.Add("正在审理", "");
                htHidden.Add("调解解决", "");
            }
            else if (jaqk == "正在审理")
            {
                htHidden.Add("不予受理", "");
                htHidden.Add("调解解决", "");
                htHidden.Add("裁决户数", "");
            }
            else if (jaqk == "不予受理")
            {
                htHidden.Add("正在审理", "");
                htHidden.Add("调解解决", "");
                htHidden.Add("裁决户数", "");

            }
            else if (jaqk == "调解解决")
            {
                htHidden.Add("正在审理", "");
                htHidden.Add("不予受理", "");
                htHidden.Add("裁决户数", "");
            }
            else
            {

            }
            return htHidden;
        }
    }
    /// <summary>
    /// 传递DataTable，返回HTML
    /// </summary>
    public class CreatHtmlTable
    {
        public string strHTML = string.Empty;
        private bool _showItem = true;//是否显示序号字段
        public bool ShowItem
        {
            get
            {
                return _showItem;
            }
            set
            {
                _showItem = value;
            }
        }
        StringBuilder strHtmlAppend = null;
        /// <summary>
        /// 根据DataTable返回HTML並自動換行
        /// </summary>
        /// <param name="htable"></param>
        /// <returns></returns>
        public String CreateHtml(StructHtmlTable htable)
        {
            DataTable dtTemp = htable.DataTableTemp;
            string tableName = htable.TableName;
            string className = "tab";
            if (!string.IsNullOrEmpty(htable.TableCss))
            {
                className = htable.TableCss;
            }
            Hashtable FormatField = htable.FormatField;
            Hashtable FieldWidth = htable.FieldWidth;
            int pagesize = htable.PageSize;
            String CountStr = htable.StatField;
            Hashtable HiddenStr = htable.HiddenField;
            if (htable.PageSize == 0)
            {
                pagesize = dtTemp.Rows.Count;
            }
            strHtmlAppend = new StringBuilder();
            strHtmlAppend.Append("<!--STARTPRINT-->");

            if (dtTemp != null && dtTemp.Rows.Count > 0)
            {
                string strPrintFlag = "page-break-after:always;";

                //设置标题名
                string TableNameStr = string.Empty;
                if (!string.IsNullOrEmpty(tableName))
                {
                    TableNameStr = "<caption><font size='3'><strong>" + tableName + "</strong></font></caption>";
                }

                int ntabCount = 0;
                //余数
                int ntabMod = dtTemp.Rows.Count % pagesize;

                //计算表格个数
                if (ntabMod > 0)
                {
                    ntabCount = dtTemp.Rows.Count / pagesize + 1;
                }
                else
                {
                    ntabCount = dtTemp.Rows.Count / pagesize;
                }

                for (int n = 0; n < ntabCount; n++)//循环生成各个表格
                {
                    int nCount = pagesize;
                    if (n == ntabCount - 1)
                    {
                        if (ntabMod != 0)
                        {
                            nCount = ntabMod;
                        }
                        strPrintFlag = string.Empty;//最后一页 去掉 page-break-after 否则多出一张空白页
                    }
                    if (n == ntabCount - 1)//最后一页
                    {
                        strHtmlAppend.AppendFormat(@"<table cellpadding='0' cellspacing='0'  bordercolor='#111111' border='1px' 
                            style='border-collapse: collapse;text-align:center;width:97%;{0}' class = '{1}'>{2}", strPrintFlag, className, TableNameStr);
                    }
                    else if (n == 0)//只有一页
                    {
                        if (dtTemp.Rows.Count < pagesize)//不足设定的行数
                            strHtmlAppend.AppendFormat(@"<table cellpadding='0' cellspacing='0' style='border-collapse: collapse;
                                text-align:center;width:97%;{0}' class = '{1}'>{2}", strPrintFlag, className, TableNameStr);
                        else//
                            strHtmlAppend.AppendFormat(@"<table cellpadding='0' cellspacing='0'style='border-collapse: collapse;
                                text-align:center;width:97%;height:90%;{0}' class = '{1}'>{2}", strPrintFlag, className, TableNameStr);
                    }
                    else
                        strHtmlAppend.AppendFormat(@"<table  cellpadding='0' cellspacing='0'style='border-collapse: collapse;text-align:center;
                                width:97%;height:95%;{0}' class = '{1}'>{2}", strPrintFlag, className, TableNameStr);
                    //生成表头
                    CreateHead(dtTemp, FieldWidth, HiddenStr);
                    int rowStart = pagesize * n;
                    int rowEnd = dtTemp.Rows.Count > pagesize ? (pagesize * n + nCount) : dtTemp.Rows.Count;
                    //生成表格数据行
                    CreateDataRows(rowStart, rowEnd, dtTemp, FormatField, HiddenStr);
                    //统计字段
                    if (!string.IsNullOrEmpty(CountStr))//如果不为空 则显示统计行
                    {
                        if (n == ntabCount - 1)
                        {
                            CountItemNum(CountStr, dtTemp, HiddenStr);
                        }
                    }
                    strHtmlAppend.Append("</table>");
                    strHtmlAppend.Append("<br/>");
                }
            }
            strHtmlAppend.Append("<!--ENDPRINT-->");
            strHTML = strHtmlAppend.ToString();
            return strHTML;
        }

        #region 生成表头
        /// <summary>
        /// 生成表头
        /// </summary>
        /// <param name="dtTemp"></param>
        /// <param name="FieldWidth">字段宽度</param>
        protected void CreateHead(DataTable dtTemp, Hashtable FieldWidth, Hashtable HiddenStr)//生成表头
        {
            strHtmlAppend.Append("<tr>");
            if (ShowItem)
            {
                strHtmlAppend.Append("<th style='width:4%'>序号</th>");
            }
            int nhashtableCount = 0;
            if (FieldWidth != null)
            {
                nhashtableCount = FieldWidth.Count;
            }
            for (int i = 0; i < dtTemp.Columns.Count; i++)
            {
                //是否为隐藏字段
                Boolean IsHiddenField = false;
                if (HiddenStr != null)
                {
                    IsHiddenField = HiddenStr.ContainsKey(dtTemp.Columns[i].ColumnName.Trim());
                }
                if (!IsHiddenField)
                {
                    if (nhashtableCount > 0)
                    {
                        if (FieldWidth.ContainsKey(dtTemp.Columns[i].ColumnName.Trim()))
                        {
                            string sName = dtTemp.Columns[i].ColumnName;
                            strHtmlAppend.AppendFormat("<th style='width:{1}'>{0}</th>", sName, FieldWidth[sName].ToString());
                            nhashtableCount--;
                        }
                        else
                        {
                            strHtmlAppend.AppendFormat("<th>{0}</th>", dtTemp.Columns[i].ColumnName);
                        }
                    }
                    else
                    {
                        strHtmlAppend.AppendFormat("<th>{0}</th>", dtTemp.Columns[i].ColumnName);
                    }
                }
            }
            strHtmlAppend.Append("</tr>");
        }
        #endregion

        #region 生成表格数据行

        protected void CreateDataRows(int rowStart, int rowEnd, DataTable dtTemp, Hashtable FormatField, Hashtable HiddenStr)//生成表格数据行
        {
            string tdstyle = " style='font-family:宋体'";
            if (FormatField != null)
            {
                if (FormatField["td"] != null)
                {
                    tdstyle = FormatField["td"].ToString();
                }
            }
            int nhashtableCount = 0;
            if (FormatField != null)
            {
                nhashtableCount = FormatField.Count;
            }
            for (int i = rowStart; i < rowEnd; i++)
            {
                strHtmlAppend.Append("<tr>");
                if (ShowItem)
                {
                    strHtmlAppend.AppendFormat(@"<td>{0}</td>", Convert.ToString(i + 1));
                }
                for (int j = 0; j < dtTemp.Columns.Count; j++)
                {
                    //是否为隐藏字段
                    Boolean IsHiddenField = false;
                    if (HiddenStr != null)
                    {
                        IsHiddenField = HiddenStr.ContainsKey(dtTemp.Columns[j].ColumnName.Trim());
                    }
                    if (!IsHiddenField)
                    {
                        if (nhashtableCount > 0)
                        {
                            Boolean HaveField = false;
                            if (FormatField != null)
                            {
                                HaveField = FormatField.ContainsKey(dtTemp.Columns[j].ColumnName.Trim());
                            }
                            if (HaveField)//HashTable中存在该列Key
                            {
                                string sName = dtTemp.Columns[j].ColumnName;
                                string strFormat = FormatField[sName].ToString();//取HashTable中值
                                strHtmlAppend.AppendFormat(@"<td {1}>{0}</td>", string.Format(strFormat, dtTemp.Rows[i][j]), tdstyle);
                            }
                            else
                            {
                                strHtmlAppend.AppendFormat(@"<td {1}>{0}</td>", dtTemp.Rows[i][j].ToString(), tdstyle);
                            }
                        }
                        else
                        {
                            if (j == 0)
                            {
                                string zhh = ReturnXKZHString(dtTemp.Rows[i][j].ToString());
                                strHtmlAppend.AppendFormat(@"<td {1}>{0}</td>", zhh, tdstyle);
                            }
                            else
                            {
                                strHtmlAppend.AppendFormat(@"<td {1}>{0}</td>", dtTemp.Rows[i][j].ToString(), tdstyle);
                            }

                        }
                    }
                }
                strHtmlAppend.Append("</tr>");
            }
        }
        #endregion

        #region 统计字段
        protected void CountItemNum(string CountStr, DataTable dtTemp, Hashtable HiddenStr)
        {
            //把需要统计值的字段名称传递进来
            String[] arrStr = CountStr.Split(',');
            strHtmlAppend.Append("<tr style='color:#ff00ff'>");
            strHtmlAppend.Append("<td>总计</td>");

            for (int i = 0; i < dtTemp.Columns.Count; i++)
            {
                int NotIn = 0;
                for (int j = 0; j < arrStr.Length; j++)
                {
                    if (dtTemp.Columns[i].ColumnName == arrStr[j])
                    {
                        int nCount = 0;
                        for (int t = 0; t < dtTemp.Rows.Count; t++)
                        {
                            nCount += Convert.ToInt32(dtTemp.Rows[t][i].ToString());
                        }
                        Boolean IsHiddenField = false;
                        if (HiddenStr != null)
                        {
                            IsHiddenField = HiddenStr.ContainsKey(dtTemp.Columns[i].ColumnName.Trim());
                        }
                        if (!IsHiddenField)
                        {
                            strHtmlAppend.AppendFormat("<td>{0}</td>", nCount.ToString());
                            NotIn = 1;
                        }
                    }
                }
                if (NotIn == 0)
                {
                    //是否为隐藏字段
                    Boolean IsHiddenField = false;
                    if (HiddenStr != null)
                    {
                        IsHiddenField = HiddenStr.ContainsKey(dtTemp.Columns[i].ColumnName.Trim());
                    }
                    if (!IsHiddenField)
                    {
                        strHtmlAppend.Append("<td></td>");
                    }
                }
            }
            strHtmlAppend.Append("</tr>");
        }
        #endregion

        /// <summary>
        /// 返回处理后行政许可号 (如：白2013052)
        /// </summary>
        /// <param name="_temp"></param>
        /// <returns></returns>
        public string ReturnXKZHString(string _temp)
        {
            string str = string.Empty;
            if (string.IsNullOrEmpty(_temp))
            {
                str = _temp;
            }
            else
            {
                if (_temp.Length > 16)
                {
                    string qu = _temp.Substring(1, 1);//第一个索引，取长度为1的字符串,得到区号
                    string regstr = @"(\d)*";
                    Regex reg = new Regex(regstr);
                    MatchCollection mc = reg.Matches(_temp);
                    string _zhi = string.Empty;
                    foreach (Match m in mc)
                    {
                        _zhi += m.Value;
                    }
                    str = qu + _zhi;
                }
                else
                {
                    str = _temp;
                }
            }
            return str;
        }

    }




    /// 功能描述  : 存放自动生成Html的信息
    /// 创建人  : Ly
    /// 创建时间: 2008年7月16日
    /// 
    public class StructHtmlTable
    {
        private DataTable _datatableTemp;
        /// <summary>
        /// 需要转变的DataTable
        /// </summary>
        public DataTable DataTableTemp
        {
            get
            {
                return _datatableTemp;
            }
            set
            {
                _datatableTemp = value;
            }
        }
        private string _tableName;
        /// <summary>
        /// 表名(显示在页面的表名,非数据库表名)
        /// </summary>
        public String TableName
        {
            get
            {
                return _tableName;
            }
            set
            {
                _tableName = value;
            }
        }

        private string _tableCss;
        /// <summary>
        /// 样式
        /// </summary>
        public String TableCss
        {
            get
            {
                return _tableCss;
            }
            set
            {
                _tableCss = value;
            }
        }
        private string _statField;
        /// <summary>
        /// 统计字段
        /// </summary>
        public String StatField
        {
            get
            {
                return _statField;
            }
            set
            {
                _statField = value;
            }
        }
        private Hashtable _formatField;
        /// <summary>
        /// 格式化字段(格式:Key存放FieldName Value存放formatType)
        /// </summary>
        public Hashtable FormatField
        {
            get
            {
                return _formatField;
            }
            set
            {
                _formatField = value;
            }
        }
        private Hashtable _fieldWidth;
        /// <summary>
        /// 字段宽度
        /// </summary>
        public Hashtable FieldWidth
        {
            get
            {
                return _fieldWidth;
            }
            set
            {
                _fieldWidth = value;
            }
        }
        private Hashtable _hiddenField;
        /// <summary>
        /// 隐藏字段
        /// </summary>
        public Hashtable HiddenField
        {
            get
            {
                return _hiddenField;
            }
            set
            {
                _hiddenField = value;
            }
        }
        private int _pageSize;
        /// <summary>
        /// 每页显示数据条数
        /// </summary>
        public Int32 PageSize
        {
            get
            {
                return _pageSize;
            }
            set
            {
                _pageSize = value;
            }
        }
        private bool _radioShow;
        /// <summary>
        /// 是否显示单选框
        /// </summary>
        public Boolean RadioShow
        {
            get
            {
                return _radioShow;
            }
            set
            {
                _radioShow = value;
            }
        }
        private bool _checkBoxShow;
        /// <summary>
        /// 是否显示复选框
        /// </summary>
        public Boolean CheckBoxShow
        {
            get
            {
                return _checkBoxShow;
            }
            set
            {
                _checkBoxShow = value;
            }
        }
        private string _valueShow;
        /// <summary>
        /// 绑定到单选或者复选框上的字段
        /// </summary>
        public String ValueShow
        {
            get
            {
                return _valueShow;
            }
            set
            {
                _valueShow = value;
            }
        }
        private Hashtable _changeField;
        /// <summary>
        /// 重命名字段（key存放Old Field,value存放New Field）
        /// </summary>
        public Hashtable ChangeField
        {
            get
            {
                return _changeField;
            }
            set
            {
                _changeField = value;
            }
        }


    }
}


